(self.webpackChunkctfd=self.webpackChunkctfd||[]).push([[694],{64524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindMarkdownEditor=m,t.bindMarkdownEditors=h,t.default=void 0,t.showMediaLibrary=f,n(80195);var r=n(56930),o=l(n(79674)),i=l(n(50647)),a=l(n(49981)),s=l(n(45763)),c=l(n(48580));function l(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n,r,o,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(document.cookie.split("; "));try{for(i.s();!(n=i.n()).done;){var a=(r=n.value.split("="),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(r,o)||p(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1];if("Scr1wCTFdLanguage"===s)return"en"===decodeURIComponent(c)?e:t}}catch(e){i.e(e)}finally{i.f()}return t}function f(e){var t=a.default.extend(s.default),n=document.createElement("div");document.querySelector("main").appendChild(n);var r=new t({propsData:{editor:e}}).$mount(n);(0,o.default)("#media-modal").on("hidden.bs.modal",(function(e){r.$destroy(),(0,o.default)("#media-modal").remove()})),(0,o.default)("#media-modal").modal()}function m(e){if(!1===e.hasOwnProperty("mde")){var t=new i.default({autoDownloadFontAwesome:!1,toolbar:["bold","italic","heading","|","quote","unordered-list","ordered-list","|","link","image",{name:"media",action:function(e){f(e)},className:"fas fa-file-upload",title:u("Media Library","媒体库")},"|","preview","guide"],element:e,initialValue:(0,o.default)(e).val(),forceSync:!0,minHeight:"200px",renderingConfig:{codeSyntaxHighlighting:!0,hljs:c.default}});e.mde=t,e.codemirror=t.codemirror,(0,o.default)(e).on("change keyup paste",(function(){t.codemirror.getDoc().setValue((0,o.default)(e).val()),t.codemirror.refresh()}))}}function h(){(0,o.default)("textarea.markdown").each((function(e,t){m(t)}))}t.default=function(){(0,o.default)(":input").each((function(){(0,o.default)(this).data("initial",(0,o.default)(this).val())})),(0,o.default)((function(){(0,o.default)("tr[data-href], td[data-href]").click((function(){if(!getSelection().toString()){var e=(0,o.default)(this).attr("data-href");e&&(window.location=e)}return!1})),(0,o.default)("[data-checkbox]").click((function(e){(0,o.default)(e.target).is("input[type=checkbox]")||(0,o.default)(this).find("input[type=checkbox]").click(),e.stopImmediatePropagation()})),(0,o.default)("[data-checkbox-all]").on("click change",(function(e){var t=(0,o.default)(this).prop("checked"),n=(0,o.default)(this).index()+1;(0,o.default)(this).closest("table").find("tr td:nth-child(".concat(n,") input[type=checkbox]")).prop("checked",t),e.stopImmediatePropagation()})),(0,o.default)("tr[data-href] a, tr[data-href] button").click((function(e){(0,o.default)(this).attr("data-dismiss")||e.stopPropagation()})),(0,o.default)(".page-select").change((function(){var e=new URL(window.location);e.searchParams.set("page",this.value),window.location.href=e.toString()})),(0,o.default)('a[data-toggle="tab"]').on("shown.bs.tab",(function(e){sessionStorage.setItem("activeTab",(0,o.default)(e.target).attr("href"))}));var e=sessionStorage.getItem("activeTab");if(e){var t=(0,o.default)('.nav-tabs a[href="'.concat(e,'"], .nav-pills a[href="').concat(e,'"]'));t.length?t.tab("show"):sessionStorage.removeItem("activeTab")}h(),(0,r.makeSortableTables)(),(0,o.default)('[data-toggle="tooltip"]').tooltip(),document.querySelectorAll("pre code").forEach((function(e){c.default.highlightBlock(e)}))}))}},66694:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n(79674)),i=u(n(71350));n(76528),n(47585);var a=u(n(49851));n(84441);var s=u(n(84750)),c=u(n(13253)),l=n(7252),p=u(n(96403)),d=n(56930);function u(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){var o,i,a;o=e,i=t,a=n[t],(i=function(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}"en"===function(e){var t,n,r,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(document.cookie.split("; "));try{for(o.s();!(t=o.n()).done;){var i=(n=t.value.split("="),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(n,r)||h(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],s=i[1];if("Scr1wCTFdLanguage"===a)return decodeURIComponent(s)}}catch(e){o.e(e)}finally{o.f()}return null}()?i.default.locale("en"):i.default.locale("zh-cn");var v=new l.API("/"),g={},b={ezq:p.default},j={$:o.default,markdown:function(e){var t=m(m({},{html:!0,linkify:!0}),e),n=(0,a.default)(t);return n.renderer.rules.link_open=function(e,t,n,r,o){return e[t].attrPush(["target","_blank"]),o.renderToken(e,t,n)},n},dayjs:i.default},_=!1,T={run:function(e){e(I)}},w={ajax:{getScript:d.getScript},html:{createHtmlNode:d.createHtmlNode,htmlEntities:d.htmlEntities}},I={init:function(e){_||(_=!0,c.default.urlRoot=e.urlRoot||c.default.urlRoot,c.default.csrfNonce=e.csrfNonce||c.default.csrfNonce,c.default.userMode=e.userMode||c.default.userMode,v.domain=c.default.urlRoot+"/api/v1",g.id=e.userId)},config:c.default,fetch:s.default,user:g,ui:b,utils:w,api:v,lib:j,_internal:{},plugin:T};t.default=I},7252:(e,t,n)=>{"use strict";var r=i(n(84750)),o=i(n(38783));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var s=function(){function e(e){var t="object"===a(e)?e.domain:e;if(this.domain=t||"",0===this.domain.length)throw new Error("Domain parameter must be specified as a string.")}function t(e,t){return e.$queryParameters&&Object.keys(e.$queryParameters).forEach((function(n){var r=e.$queryParameters[n];t[n]=r})),t}return e.prototype.request=function(e,t,n,o,i,a,s,c){var l=a&&Object.keys(a).length?function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}(a):null,p=t+(l?"?"+l:"");o&&!Object.keys(o).length&&(o=void 0),(0,r.default)(p,{method:e,headers:i,body:JSON.stringify(o)}).then((function(e){return e.json()})).then((function(e){c.resolve(e)})).catch((function(e){c.reject(e)}))},e.prototype.post_award_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/awards",e,{},a,i,{},n),n.promise},e.prototype.delete_award=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/awards/{award_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{award_id}",e.awardId),void 0===e.awardId?(n.reject(new Error("Missing required  parameter: awardId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_award=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/awards/{award_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{award_id}",e.awardId),void 0===e.awardId?(n.reject(new Error("Missing required  parameter: awardId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_challenge_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/challenges",e,{},a,i,{},n),n.promise},e.prototype.get_challenge_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/challenges",e,{},a,i,{},n),n.promise},e.prototype.post_challenge_attempt=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/challenges/attempt",e,{},a,i,{},n),n.promise},e.prototype.get_challenge_types=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/challenges/types",e,{},a,i,{},n),n.promise},e.prototype.patch_challenge=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/challenges/{challenge_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?(n.reject(new Error("Missing required  parameter: challengeId")),n.promise):(a=t(e,a),this.request("PATCH",r+i,e,{},s,a,{},n),n.promise)},e.prototype.delete_challenge=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/challenges/{challenge_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?(n.reject(new Error("Missing required  parameter: challengeId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_challenge=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/challenges/{challenge_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?(n.reject(new Error("Missing required  parameter: challengeId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_challenge_files=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/challenges/{challenge_id}/files",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return void 0!==e.id&&(a.id=e.id),i=i.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?(n.reject(new Error("Missing required  parameter: challengeId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_challenge_flags=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/challenges/{challenge_id}/flags",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return void 0!==e.id&&(a.id=e.id),i=i.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?(n.reject(new Error("Missing required  parameter: challengeId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_challenge_hints=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/challenges/{challenge_id}/hints",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return void 0!==e.id&&(a.id=e.id),i=i.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?(n.reject(new Error("Missing required  parameter: challengeId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_challenge_solves=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/challenges/{challenge_id}/solves",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return void 0!==e.id&&(a.id=e.id),i=i.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?(n.reject(new Error("Missing required  parameter: challengeId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_challenge_tags=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/challenges/{challenge_id}/tags",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return void 0!==e.id&&(a.id=e.id),i=i.replace("{challenge_id}",e.challengeId),void 0===e.challengeId?(n.reject(new Error("Missing required  parameter: challengeId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_config_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/configs",e,{},a,i,{},n),n.promise},e.prototype.patch_config_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("PATCH",r+"/configs",e,{},a,i,{},n),n.promise},e.prototype.get_config_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/configs",e,{},a,i,{},n),n.promise},e.prototype.patch_config=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/configs/{config_key}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{config_key}",e.configKey),void 0===e.configKey?(n.reject(new Error("Missing required  parameter: configKey")),n.promise):(a=t(e,a),this.request("PATCH",r+i,e,{},s,a,{},n),n.promise)},e.prototype.delete_config=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/configs/{config_key}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{config_key}",e.configKey),void 0===e.configKey?(n.reject(new Error("Missing required  parameter: configKey")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_config=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/configs/{config_key}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{config_key}",e.configKey),void 0===e.configKey?(n.reject(new Error("Missing required  parameter: configKey")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_files_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/files",e,{},a,i,{},n),n.promise},e.prototype.get_files_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/files",e,{},a,i,{},n),n.promise},e.prototype.delete_files_detail=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/files/{file_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{file_id}",e.fileId),void 0===e.fileId?(n.reject(new Error("Missing required  parameter: fileId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_files_detail=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/files/{file_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{file_id}",e.fileId),void 0===e.fileId?(n.reject(new Error("Missing required  parameter: fileId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_flag_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/flags",e,{},a,i,{},n),n.promise},e.prototype.get_flag_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/flags",e,{},a,i,{},n),n.promise},e.prototype.get_flag_types=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/flags/types",e,{},a,i,{},n),n.promise},e.prototype.get_flag_types_1=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/flags/types/{type_name}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{type_name}",e.typeName),void 0===e.typeName?(n.reject(new Error("Missing required  parameter: typeName")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.patch_flag=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/flags/{flag_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{flag_id}",e.flagId),void 0===e.flagId?(n.reject(new Error("Missing required  parameter: flagId")),n.promise):(a=t(e,a),this.request("PATCH",r+i,e,{},s,a,{},n),n.promise)},e.prototype.delete_flag=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/flags/{flag_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{flag_id}",e.flagId),void 0===e.flagId?(n.reject(new Error("Missing required  parameter: flagId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_flag=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/flags/{flag_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{flag_id}",e.flagId),void 0===e.flagId?(n.reject(new Error("Missing required  parameter: flagId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_hint_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/hints",e,{},a,i,{},n),n.promise},e.prototype.get_hint_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/hints",e,{},a,i,{},n),n.promise},e.prototype.patch_hint=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/hints/{hint_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{hint_id}",e.hintId),void 0===e.hintId?(n.reject(new Error("Missing required  parameter: hintId")),n.promise):(a=t(e,a),this.request("PATCH",r+i,e,{},s,a,{},n),n.promise)},e.prototype.delete_hint=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/hints/{hint_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{hint_id}",e.hintId),void 0===e.hintId?(n.reject(new Error("Missing required  parameter: hintId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_hint=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/hints/{hint_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{hint_id}",e.hintId),void 0===e.hintId?(n.reject(new Error("Missing required  parameter: hintId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_notification_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/notifications",e,{},a,i,{},n),n.promise},e.prototype.get_notification_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/notifications",e,{},a,i,{},n),n.promise},e.prototype.delete_notification=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/notifications/{notification_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{notification_id}",e.notificationId),void 0===e.notificationId?(n.reject(new Error("Missing required  parameter: notificationId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_notification=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/notifications/{notification_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{notification_id}",e.notificationId),void 0===e.notificationId?(n.reject(new Error("Missing required  parameter: notificationId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_page_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/pages",e,{},a,i,{},n),n.promise},e.prototype.get_page_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/pages",e,{},a,i,{},n),n.promise},e.prototype.patch_page_detail=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/pages/{page_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{page_id}",e.pageId),void 0===e.pageId?(n.reject(new Error("Missing required  parameter: pageId")),n.promise):(a=t(e,a),this.request("PATCH",r+i,e,{},s,a,{},n),n.promise)},e.prototype.delete_page_detail=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/pages/{page_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{page_id}",e.pageId),void 0===e.pageId?(n.reject(new Error("Missing required  parameter: pageId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_page_detail=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/pages/{page_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{page_id}",e.pageId),void 0===e.pageId?(n.reject(new Error("Missing required  parameter: pageId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_scoreboard_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/scoreboard",e,{},a,i,{},n),n.promise},e.prototype.get_scoreboard_detail=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/scoreboard/top/{count}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{count}",e.count),void 0===e.count?(n.reject(new Error("Missing required  parameter: count")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_challenge_solve_statistics=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/statistics/challenges/solves",e,{},a,i,{},n),n.promise},e.prototype.get_challenge_solve_percentages=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/statistics/challenges/solves/percentages",e,{},a,i,{},n),n.promise},e.prototype.get_challenge_property_counts=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/statistics/challenges/{column}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{column}",e.column),void 0===e.column?(n.reject(new Error("Missing required  parameter: column")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_submission_property_counts=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/statistics/submissions/{column}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{column}",e.column),void 0===e.column?(n.reject(new Error("Missing required  parameter: column")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_team_statistics=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/statistics/teams",e,{},a,i,{},n),n.promise},e.prototype.get_user_statistics=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/statistics/users",e,{},a,i,{},n),n.promise},e.prototype.get_user_property_counts=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/statistics/users/{column}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{column}",e.column),void 0===e.column?(n.reject(new Error("Missing required  parameter: column")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_submissions_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/submissions",e,{},a,i,{},n),n.promise},e.prototype.get_submissions_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/submissions",e,{},a,i,{},n),n.promise},e.prototype.delete_submission=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/submissions/{submission_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{submission_id}",e.submissionId),void 0===e.submissionId?(n.reject(new Error("Missing required  parameter: submissionId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_submission=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/submissions/{submission_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{submission_id}",e.submissionId),void 0===e.submissionId?(n.reject(new Error("Missing required  parameter: submissionId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_tag_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/tags",e,{},a,i,{},n),n.promise},e.prototype.get_tag_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/tags",e,{},a,i,{},n),n.promise},e.prototype.patch_tag=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/tags/{tag_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{tag_id}",e.tagId),void 0===e.tagId?(n.reject(new Error("Missing required  parameter: tagId")),n.promise):(a=t(e,a),this.request("PATCH",r+i,e,{},s,a,{},n),n.promise)},e.prototype.delete_tag=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/tags/{tag_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{tag_id}",e.tagId),void 0===e.tagId?(n.reject(new Error("Missing required  parameter: tagId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_tag=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/tags/{tag_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{tag_id}",e.tagId),void 0===e.tagId?(n.reject(new Error("Missing required  parameter: tagId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_team_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/teams",e,{},a,i,{},n),n.promise},e.prototype.get_team_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/teams",e,{},a,i,{},n),n.promise},e.prototype.patch_team_private=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return void 0!==e.teamId&&(i.team_id=e.teamId),i=t(e,i),this.request("PATCH",r+"/teams/me",e,{},a,i,{},n),n.promise},e.prototype.get_team_private=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return void 0!==e.teamId&&(i.team_id=e.teamId),i=t(e,i),this.request("GET",r+"/teams/me",e,{},a,i,{},n),n.promise},e.prototype.patch_team_public=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/teams/{team_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{team_id}",e.teamId),void 0===e.teamId?(n.reject(new Error("Missing required  parameter: teamId")),n.promise):(a=t(e,a),this.request("PATCH",r+i,e,{},s,a,{},n),n.promise)},e.prototype.delete_team_public=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/teams/{team_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{team_id}",e.teamId),void 0===e.teamId?(n.reject(new Error("Missing required  parameter: teamId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_team_public=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/teams/{team_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{team_id}",e.teamId),void 0===e.teamId?(n.reject(new Error("Missing required  parameter: teamId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_team_awards=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/teams/{team_id}/awards",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{team_id}",e.teamId),void 0===e.teamId?(n.reject(new Error("Missing required  parameter: teamId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_team_fails=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/teams/{team_id}/fails",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{team_id}",e.teamId),void 0===e.teamId?(n.reject(new Error("Missing required  parameter: teamId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_team_solves=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/teams/{team_id}/solves",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{team_id}",e.teamId),void 0===e.teamId?(n.reject(new Error("Missing required  parameter: teamId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.post_unlock_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/unlocks",e,{},a,i,{},n),n.promise},e.prototype.get_unlock_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/unlocks",e,{},a,i,{},n),n.promise},e.prototype.post_user_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("POST",r+"/users",e,{},a,i,{},n),n.promise},e.prototype.get_user_list=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/users",e,{},a,i,{},n),n.promise},e.prototype.patch_user_private=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("PATCH",r+"/users/me",e,{},a,i,{},n),n.promise},e.prototype.get_user_private=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=t(e,i),this.request("GET",r+"/users/me",e,{},a,i,{},n),n.promise},e.prototype.patch_user_public=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/users/{user_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{user_id}",e.userId),void 0===e.userId?(n.reject(new Error("Missing required  parameter: userId")),n.promise):(a=t(e,a),this.request("PATCH",r+i,e,{},s,a,{},n),n.promise)},e.prototype.delete_user_public=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/users/{user_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{user_id}",e.userId),void 0===e.userId?(n.reject(new Error("Missing required  parameter: userId")),n.promise):(a=t(e,a),this.request("DELETE",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_user_public=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/users/{user_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{user_id}",e.userId),void 0===e.userId?(n.reject(new Error("Missing required  parameter: userId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_user_awards=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/users/{user_id}/awards",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{user_id}",e.userId),void 0===e.userId?(n.reject(new Error("Missing required  parameter: userId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_user_fails=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/users/{user_id}/fails",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{user_id}",e.userId),void 0===e.userId?(n.reject(new Error("Missing required  parameter: userId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e.prototype.get_user_solves=function(e){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/users/{user_id}/solves",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{user_id}",e.userId),void 0===e.userId?(n.reject(new Error("Missing required  parameter: userId")),n.promise):(a=t(e,a),this.request("GET",r+i,e,{},s,a,{},n),n.promise)},e}();t.API=s},13253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={urlRoot:"",csrfNonce:"",userMode:""}},90840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(54830),o=n(38939),i=n(96403),a=n(56930);function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=o.NativeEventSource||o.EventSourcePolyfill;t.default=function(e){var t=new l(e+"/events"),n=new a.WindowController,o=new r.Howl({src:[e+"/themes/core/static/sounds/notification.webm",e+"/themes/core/static/sounds/notification.mp3"]});function c(e){var t,n,r,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}(document.cookie.split("; "));try{for(o.s();!(t=o.n()).done;){var i=(n=t.value.split("="),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(n,r)||s(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],c=i[1];if(a===e)return decodeURIComponent(c)}}catch(e){o.e(e)}finally{o.f()}return null}function p(e){switch(e.type){case"toast":(0,a.inc_notification_counter)();var t=e.content.length>50?e.content.substring(0,47)+"...":e.content,n=!1;(0,i.ezToast)({title:e.title,body:t,onclick:function(){(0,i.ezAlert)({title:e.title,body:e.html,button:"en"===c("Scr1wCTFdLanguage")?"Got it!":"好的！",success:function(){n=!0,(0,a.dec_notification_counter)()}})},onclose:function(){n||(0,a.dec_notification_counter)()}});break;case"alert":(0,a.inc_notification_counter)(),(0,i.ezAlert)({title:e.title,body:e.html,button:"en"===c("Scr1wCTFdLanguage")?"Got it!":"好的！",success:function(){(0,a.dec_notification_counter)()}});break;default:(0,a.inc_notification_counter)()}}(0,a.init_notification_counter)(),n.alert=function(e){p(e)},n.toast=function(e){p(e)},n.background=function(e){p(e)},n.masterDidChange=function(){this.isMaster?t.addEventListener("notification",(function(e){var t=JSON.parse(e.data);n.broadcast("notification",t),p(t),t.sound&&o.play()}),!1):t&&t.close()}}},96403:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.ezAlert=v,t.ezBadge=_,t.ezProgressBar=j,t.ezQuery=b,t.ezToast=g,n(14436);var r=i(n(79674)),o=i(n(48580));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t,n,r,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw i}}}}(document.cookie.split("; "));try{for(o.s();!(t=o.n()).done;){var i=(n=t.value.split("="),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(n,r)||a(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=i[0],c=i[1];if(s===e)return decodeURIComponent(c)}}catch(e){o.e(e)}finally{o.f()}return null}var l='<div class="modal fade" tabindex="-1" role="dialog">  <div class="modal-dialog" role="document">    <div class="modal-content">      <div class="modal-header">        <h5 class="modal-title">{0}</h5>        <button type="button" class="close" data-dismiss="modal" aria-label="Close">          <span aria-hidden="true">&times;</span>        </button>      </div>      <div class="modal-body">      </div>      <div class="modal-footer">      </div>    </div>  </div></div>',p='<div class="toast m-3" role="alert">  <div class="toast-header">    <strong class="mr-auto">{0}</strong>    <button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">      <span aria-hidden="true">&times;</span>    </button>  </div>  <div class="toast-body">{1}</div></div>',d='<div class="progress">  <div class="progress-bar progress-bar-success progress-bar-striped progress-bar-animated" role="progressbar" style="width: {0}%">  </div></div>',u='<div class="alert alert-danger alert-dismissable" role="alert">\n  <span class="sr-only">'+("en"===c("Scr1wCTFdLanguage")?"Error:":"错误：")+'</span>\n  {0}\n  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>\n</div>',f='<div class="alert alert-success alert-dismissable submit-row" role="alert">\n  <strong>'+("en"===c("Scr1wCTFdLanguage")?"Success!":"成功！")+'</strong>\n  {0}\n  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>\n</div>',m='<button type="button" class="btn btn-primary" data-dismiss="modal">{0}</button>',h='<button type="button" class="btn btn-danger" data-dismiss="modal">'+("en"===c("Scr1wCTFdLanguage")?"No":"否")+"</button>",y='<button type="button" class="btn btn-primary" data-dismiss="modal">'+("en"===c("Scr1wCTFdLanguage")?"Yes":"是")+"</button>";function v(e){var t=l.format(e.title),n=(0,r.default)(t);"string"==typeof e.body?n.find(".modal-body").append("<p>".concat(e.body,"</p>")):n.find(".modal-body").append((0,r.default)(e.body));var i=(0,r.default)(m.format(e.button));return e.success&&(0,r.default)(i).click((function(){e.success()})),e.large&&n.find(".modal-dialog").addClass("modal-lg"),n.find(".modal-footer").append(i),n.find("pre code").each((function(e){o.default.highlightBlock(this)})),(0,r.default)("main").append(n),n.modal("show"),(0,r.default)(n).on("hidden.bs.modal",(function(){(0,r.default)(this).modal("dispose")})),n}function g(e){(0,r.default)("#ezq--notifications-toast-container").length||(0,r.default)("body").append((0,r.default)("<div/>").attr({id:"ezq--notifications-toast-container"}).css({position:"fixed",bottom:"0",right:"0","min-width":"20%"}));var t=p.format(e.title,e.body),n=(0,r.default)(t);if(e.onclose&&(0,r.default)(n).find("button[data-dismiss=toast]").click((function(){e.onclose()})),e.onclick){var o=(0,r.default)(n).find(".toast-body");o.addClass("cursor-pointer"),o.click((function(){e.onclick()}))}var i=!1!==e.autohide,a=!1!==e.animation,s=e.delay||1e4;return(0,r.default)("#ezq--notifications-toast-container").prepend(n),n.toast({autohide:i,delay:s,animation:a}),n.toast("show"),n}function b(e){var t=l.format(e.title),n=(0,r.default)(t);"string"==typeof e.body?n.find(".modal-body").append("<p>".concat(e.body,"</p>")):n.find(".modal-body").append((0,r.default)(e.body));var i=(0,r.default)(y),a=(0,r.default)(h);return n.find(".modal-footer").append(a),n.find(".modal-footer").append(i),n.find("pre code").each((function(e){o.default.highlightBlock(this)})),(0,r.default)("main").append(n),(0,r.default)(n).on("hidden.bs.modal",(function(){(0,r.default)(this).modal("dispose")})),(0,r.default)(i).click((function(){e.success()})),n.modal("show"),n}function j(e){if(e.target){var t=(0,r.default)(e.target);return t.find(".progress-bar").css("width",e.width+"%"),t}var n=d.format(e.width),o=l.format(e.title),i=(0,r.default)(o);return i.find(".modal-body").append((0,r.default)(n)),(0,r.default)("main").append(i),i.modal("show")}function _(e){var t={success:f,error:u}[e.type].format(e.body);return(0,r.default)(t)}var T={ezAlert:v,ezToast:g,ezQuery:b,ezProgressBar:j,ezBadge:_};t.default=T},84750:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(90442);var r,o=(r=n(13253))&&r.__esModule?r:{default:r},i=window.fetch;t.default=function(e,t){return void 0===t&&(t={method:"GET",credentials:"same-origin",headers:{}}),e=o.default.urlRoot+e,void 0===t.headers&&(t.headers={}),t.credentials="same-origin",t.headers.Accept="application/json",t.headers.hasOwnProperty("Content-Type")||(t.headers["Content-Type"]="application/json"),t.headers["CSRF-Token"]=o.default.csrfNonce,i(e,t)}},55046:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(79674)),i=s(n(96403)),a=n(56930);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(document.cookie.split("; "));try{for(n.s();!(t=n.n()).done;){var r=l(t.value.split("="),2),o=r[0],i=r[1];if(o===e)return decodeURIComponent(i)}}catch(e){n.e(e)}finally{n.f()}return null}var f={files:{upload:function(e,t,n){var r=window.CTFd;e instanceof o.default&&(e=e[0]);var a=new FormData(e);a.append("nonce",r.config.csrfNonce);for(var s=0,c=Object.entries(t);s<c.length;s++){var p=l(c[s],2),d=p[0],f=p[1];a.append(d,f)}var m=i.default.ezProgressBar({width:0,title:"en"===u("Scr1wCTFdLanguage")?"Upload Progress":"上传进度"});o.default.ajax({url:r.config.urlRoot+"/api/v1/files",data:a,type:"POST",cache:!1,contentType:!1,processData:!1,xhr:function(){var e=o.default.ajaxSettings.xhr();return e.upload.onprogress=function(e){if(e.lengthComputable){var t=e.loaded/e.total*100;m=i.default.ezProgressBar({target:m,width:t})}},e},success:function(t){e.reset(),m=i.default.ezProgressBar({target:m,width:100}),setTimeout((function(){m.modal("hide")}),500),n&&n(t)}})}},comments:{get_comments:function(e){return window.CTFd.fetch("/api/v1/comments?"+o.default.param(e),{method:"GET",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function(e){return e.json()}))},add_comment:function(e,t,n,o){var i=window.CTFd,a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){var o,i,a;o=e,i=t,a=n[t],(i=function(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({content:e,type:t},n);i.fetch("/api/v1/comments",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((function(e){return e.json()})).then((function(e){o&&o(e)}))},delete_comment:function(e){return window.CTFd.fetch("/api/v1/comments/".concat(e),{method:"DELETE",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function(e){return e.json()}))}},utils:{htmlEntities:a.htmlEntities,colorHash:a.colorHash,copyToClipboard:a.copyToClipboard},ezq:i.default};t.default=f},84441:(e,t,n)=>{"use strict";var r,o=(r=n(38783))&&r.__esModule?r:{default:r},i=n(7252);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===a(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return c(c({},e),t)}i.API.prototype.requestRaw=function(e,t,n,r,o,i,a,s){var c=i&&Object.keys(i).length?function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}(i):null,l=t+(c?"?"+c:"");r&&!Object.keys(r).length&&(r=void 0),fetch(l,{method:e,headers:o,body:r}).then((function(e){return e.json()})).then((function(e){s.resolve(e)})).catch((function(e){s.reject(e)}))},i.API.prototype.patch_user_public=function(e,t){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/users/{user_id}",a={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{user_id}",e.userId),void 0===e.userId?(n.reject(new Error("Missing required  parameter: userId")),n.promise):(this.request("PATCH",r+i,e,t,a,{},{},n),n.promise)},i.API.prototype.patch_user_private=function(e,t){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={Accept:["application/json"],"Content-Type":["application/json"]};return this.request("PATCH",r+"/users/me",e,t,i,{},{},n),n.promise},i.API.prototype.post_unlock_list=function(e,t){var n=o.default.defer(),r=this.domain,i={Accept:["application/json"],"Content-Type":["application/json"]};return this.request("POST",r+"/unlocks",e,t,i,{},{},n),n.promise},i.API.prototype.post_notification_list=function(e,t){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={Accept:["application/json"],"Content-Type":["application/json"]};return this.request("POST",r+"/notifications",e,t,i,{},{},n),n.promise},i.API.prototype.post_files_list=function(e,t){var n=o.default.defer(),r=this.domain,i={Accept:["application/json"],"Content-Type":["application/json"]};return this.requestRaw("POST",r+"/files",e,t,i,{},{},n),n.promise},i.API.prototype.patch_config=function(e,t){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/configs/{config_key}",a={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{config_key}",e.configKey),void 0===e.configKey?(n.reject(new Error("Missing required  parameter: configKey")),n.promise):(this.request("PATCH",r+i,e,t,a,{},{},n),n.promise)},i.API.prototype.patch_config_list=function(e,t){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=p(e,i),this.request("PATCH",r+"/configs",e,t,a,i,{},n),n.promise},i.API.prototype.post_tag_list=function(e,t){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=p(e,i),this.request("POST",r+"/tags",e,t,a,i,{},n),n.promise},i.API.prototype.patch_team_public=function(e,t){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i="/teams/{team_id}",a={},s={Accept:["application/json"],"Content-Type":["application/json"]};return i=i.replace("{team_id}",e.teamId),void 0===e.teamId?(n.reject(new Error("Missing required  parameter: teamId")),n.promise):(a=p(e,a),this.request("PATCH",r+i,e,t,s,a,{},n),n.promise)},i.API.prototype.post_challenge_attempt=function(e,t){void 0===e&&(e={});var n=o.default.defer(),r=this.domain,i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return i=p(e,i),this.request("POST",r+"/challenges/attempt",e,t,a,i,{},n),n.promise},i.API.prototype.get_hint=function(e){void 0===e&&(e={});var t=o.default.defer(),n=this.domain,r="/hints/{hint_id}",i={},a={Accept:["application/json"],"Content-Type":["application/json"]};return r=r.replace("{hint_id}",e.hintId),void 0===e.hintId?(t.reject(new Error("Missing required  parameter: hintId")),t.promise):(delete e.hintId,i=p(e,i),this.request("GET",n+r,e,{},a,i,{},t),t.promise)}},40710:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(71350));n(76528),n(47585);var o=a(n(90146)),i=a(n(79674));function a(e){return e&&e.__esModule?e:{default:e}}r.default.extend(o.default),t.default=function(){(0,i.default)("[data-time]").each((function(e,t){var n=(0,i.default)(t),o=n.data("time"),a=n.data("time-format")||"MMMM Do, HH:mm:ss ";t.innerText=(0,r.default)(o).format(a)}))}},56930:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowController=s,t.clear_notification_counter=p,t.colorHash=function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t),t&=t;var r=(t%25+25)%25+75,o=(t%20+20)%20+40;return"hsl(".concat((t%360+360)%360,", ").concat(r,"%, ").concat(o,"%)")},t.copyToClipboard=function(e,t){(0,o.default)(t).select(),document.execCommand("copy"),(0,o.default)(e.target).tooltip({title:"en"===d("Scr1wCTFdLanguage")?"Copied!":"复制成功！",trigger:"manual"}),(0,o.default)(e.target).tooltip("show"),setTimeout((function(){(0,o.default)(e.target).tooltip("hide")}),1500)},t.createHtmlNode=function(e){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild},t.cumulativeSum=function(e){for(var t=e.concat(),n=0;n<e.length;n++)t[n]=e.slice(0,n+1).reduce((function(e,t){return e+t}));return t},t.dec_notification_counter=function(){var e=c.getItem(l)||0;e>0&&(c.setItem(l,--e),(0,o.default)(".badge-notification").text(e)),0==e&&p()},t.getScript=function(e){return new Promise((function(t,n){var r=document.createElement("script");document.body.appendChild(r),r.onload=t,r.onerror=n,r.async=!0,r.src=e}))},t.htmlEntities=function(e){return(0,o.default)("<div/>").text(e).html()},t.inc_notification_counter=function(){var e=c.getItem(l)||0;c.setItem(l,++e),(0,o.default)(".badge-notification").text(e)},t.init_notification_counter=function(){var e=c.getItem(l);null===e?c.setItem(l,0):e>0&&(0,o.default)(".badge-notification").text(e)},t.makeSortableTables=function(){function e(e,t){return(0,o.default)(e).children("td").eq(t).text()}(0,o.default)("th.sort-col").append(' <i class="fas fa-sort"></i>'),(0,o.default)("th.sort-col").click((function(){var t,n=(0,o.default)(this).parents("table").eq(0),r=n.find("tr:gt(0)").toArray().sort((t=(0,o.default)(this).index(),function(n,r){var i=e(n,t),a=e(r,t);return o.default.isNumeric(i)&&o.default.isNumeric(a)?i-a:i.toString().localeCompare(a)}));this.asc=!this.asc,this.asc||(r=r.reverse());for(var i=0;i<r.length;i++)n.append(r[i])}))},t.set_notification_counter=function(e){c.setItem(l,e)};var r,o=(r=n(79674))&&r.__esModule?r:{default:r};function i(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(){this.id=Math.random(),this.isMaster=!1,this.others={},window.addEventListener("storage",this,!1),window.addEventListener("unload",this,!1),this.broadcast("hello");var e=this;this._checkTimeout=setTimeout((function t(){e.check(),e._checkTimeout=setTimeout(t,9e3)}),500),this._pingTimeout=setTimeout((function t(){e.sendPing(),e._pingTimeout=setTimeout(t,17e3)}),17e3)}o.default.fn.serializeJSON=function(e){var t={},n=(0,o.default)(this),r=n.serializeArray();return(r=(r=r.concat(n.find("input[type=checkbox]:checked").map((function(){return{name:this.name,value:!0}})).get())).concat(n.find("input[type=checkbox]:not(:checked)").map((function(){return{name:this.name,value:!1}})).get())).map((function(r){if(e)if(null!==r.value&&""!==r.value)t[r.name]=r.value;else{var o=n.find(":input[name='".concat(r.name,"']"));o.data("initial")!==o.val()&&(t[r.name]=r.value)}else t[r.name]=r.value})),t},String.prototype.format=String.prototype.f=function(){for(var e=this,t=arguments.length;t--;)e=e.replace(new RegExp("\\{"+t+"\\}","gm"),arguments[t]);return e},String.prototype.hashCode=function(){var e,t,n=0;if(0==this.length)return n;for(e=0,t=this.length;e<t;e++)n=(n<<5)-n+this.charCodeAt(e),n|=0;return n},s.prototype.destroy=function(){clearTimeout(this._pingTimeout),clearTimeout(this._checkTimeout),window.removeEventListener("storage",this,!1),window.removeEventListener("unload",this,!1),this.broadcast("bye")},s.prototype.handleEvent=function(e){if("unload"===e.type)this.destroy();else if("broadcast"===e.key)try{var t=JSON.parse(e.newValue);t.id!==this.id&&this[t.type](t)}catch(e){console.log(e)}},s.prototype.sendPing=function(){this.broadcast("ping")},s.prototype.hello=function(e){this.ping(e),e.id<this.id?this.check():this.sendPing()},s.prototype.ping=function(e){this.others[e.id]=+new Date},s.prototype.bye=function(e){delete this.others[e.id],this.check()},s.prototype.check=function(e){var t,n=+new Date,r=!0;for(t in this.others)this.others[t]+23e3<n?delete this.others[t]:t<this.id&&(r=!1);this.isMaster!==r&&(this.isMaster=r,this.masterDidChange())},s.prototype.masterDidChange=function(){},s.prototype.broadcast=function(e,t){var n={id:this.id,type:e};for(var r in t)n[r]=t[r];try{localStorage.setItem("broadcast",JSON.stringify(n))}catch(e){console.log(e)}};var c=window.localStorage,l="unread_notifications";function p(){c.setItem(l,0),(0,o.default)(".badge-notification").empty()}function d(e){var t,n,r,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}(document.cookie.split("; "));try{for(o.s();!(t=o.n()).done;){var a=(n=t.value.split("="),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(n,r)||i(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1];if(s===e)return decodeURIComponent(c)}}catch(e){o.e(e)}finally{o.f()}return null}},62562:()=>{}}]);